﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace TheNewTuringOmnibus {

    static class Algorithms {

        public static Image CreateWallpaper(Int32 cornerA, Int32 cornerB, double side) {
            Bitmap bmp = new Bitmap(200, 200);
            
            for (Int32 i = 0; i < 100; i++) {
                for (Int32 j = 0; j < 100; j++) {
                    double x = (cornerA + i) * (side / 100.0);
                    double y = (cornerB + j) * (side / 100.0);
                    Int32 c = (Int32)Math.Round((x * x) + (y * y));
                    if (c % 2 == 0)
                        bmp.SetPixel((Int32)x, (Int32)y, Color.White);
                }
            }

            return bmp;
        }
    }
}
